package net.bezrabotnih.client.managed.ui;

import com.google.gwt.requestfactory.ui.client.ProxyRenderer;
import net.bezrabotnih.client.managed.request.JobTypeProxy;

public class JobTypeProxyRenderer extends ProxyRenderer<JobTypeProxy> {

    private static net.bezrabotnih.client.managed.ui.JobTypeProxyRenderer INSTANCE;

    protected JobTypeProxyRenderer() {
        super(new String[] { "name" });
    }

    public static net.bezrabotnih.client.managed.ui.JobTypeProxyRenderer instance() {
        if (INSTANCE == null) {
            INSTANCE = new JobTypeProxyRenderer();
        }
        return INSTANCE;
    }

    public String render(JobTypeProxy object) {
        if (object == null) {
            return "";
        }
        return object.getName() + " (" + object.getId() + ")";
    }
}
